import MaiYa from '@/views/Shichang/ShichangLy/MaiYa.vue'
import WaiMai from '@/views/Shichang/ShichangLy/WaiMai.vue'
import YisSong from '@/views/Shichang/ShichangLy/YisSong.vue'
import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import MyBazaar from '../views/Shichang/MyBazaar.vue'
import ZiYing from '../views/ziying/ZiYing.vue';
import JieRu from "@/views/ziying/ziyingzi/JieRu.vue"
import CeShi from "@/views/ziying/ziyingzi/CeShi.vue"
import KaiTong from "@/views/ziying/ziyingzi/KaiTong.vue"
import MyServer from '@/views/MyServer/MyServer.vue'
import MySon from '@/views/MyServer/MyChild/MySon.vue'
import MyCeshi from '@/views/MyServer/MyChild/MyCeshi'
import MyKifa from '@/views/MyServer/MyChild/MyKifa'
import MySuoyin from '@/views/MyServer/MyChild/MySuoyin'
import MyWnti from '@/views/MyServer/MyChild/MyWnti'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView

    },
    {
        path: "/mybazaar",
        name: "mybazaar",
        component: MyBazaar,
        redirect: "/mybazaar/yisong",
        children: [
            {
                path: "yisong",
                name: "yisong",
                component: YisSong,
            },
            {
                path: "maiya",
                name: "maiya",
                component: MaiYa,
            },
            {
                path: "waimai",
                name: "waimai",
                component: WaiMai,
            }
        ]
    },
    {
        path:"/ZiYing",
        name:"ZiYing",
        component:ZiYing,
        redirect:"/ziying/JieRu",
        children:[
            {
                path:"JieRu",
                name:"JieRu",
                component:JieRu
            },
            {
                path:"CeShi",
                name:"CeShi",
                component:CeShi
            },
            {
                path:"KaiTong",
                name:"KaiTong",
                component:KaiTong
            }
        ]
    },
    {
        path: '/MyServer',
        name: 'MyServer',
        component:MyServer,
        redirect:"/MyServer/MySon",
        children:[
            {
                path:"MySon",
                name:"MySon",
                component:MySon
            },
            {
                path:"MyCeshi",
                name:"MyCeshi",
                component:MyCeshi
            },
            {
                path:"MyKifa",
                name:"MyKifa",
                component:MyKifa
            },
            {
                path:"MySuoyin",
                name:"MySuoyin",
                component:MySuoyin
            },
            {
                path:"MyWnti",
                name:"MyWnti",
                component:MyWnti
            }
        ]
    },
    {
        path: '/about',
        name: 'about',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
    },

];

const router = new VueRouter({
    routes,
});


export default router
